import request from '@/utils/request';

// 查询积分商品分类列表
export function listIntegralCategory(query) {
	return request({
		url: '/mall/integral/category/list',
		method: 'post',
		data: query,
	});
}

// 查询积分商品分类详细
export function getIntegralCategory(id) {
	return request({
		url: '/mall/integral/category/getInfo',
		method: 'post',
		data: id,
	});
}

// 新增积分商品分类
export function addIntegralCategory(data) {
	return request({
		url: '/mall/integral/category/add',
		method: 'post',
		data: data,
	});
}

// 编辑积分商品分类
export function updateIntegralCategory(data) {
	return request({
		url: '/mall/integral/category/edit',
		method: 'post',
		data: data,
	});
}

// 删除积分商品分类
export function delIntegralCategory(id) {
	return request({
		url: '/mall/integral/category/remove',
		method: 'post',
		data: id,
	});
}

// 导出积分商品分类
export function exportIntegralCategory(query) {
	return request({
		url: '/mall/integral/category/export',
		method: 'post',
		params: query,
	});
}

export const listAllIntegralCategory = () => {
	return request({
		url: '/mall/integral/category/listAll',
		method: 'post',
	});
};
